<!DOCTYPE html>
<html lang="zh-cn" class="am-touch js cssanimations">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>{$Think.config.website.name}</title>
    <meta name="keywords" content="{$Think.config.website.name}">
    <meta name="description" content="{$Think.config.website.name}">
    <link rel="stylesheet" href="__TAOKE__/css/amazeui.min.css">
    <link rel="stylesheet" href="__TAOKE__/css/common.css"> 
    <!--[if (gte IE 9)|!(IE)]><!--> 
    <script src="__TAOKE__/js/jquery.min.js"></script>
    <script src="__TAOKE__/js/amazeui.lazyload.min.js"></script>
    <script src="__TAOKE__/js/base.js"></script>
    <!--<![endif]-->

<style>
.am-gotop-fixed .am-gotop-icon:hover {
    color: #ff464e;
}
</style>

</head>
<body> 
    <!--头部-->
    
    <!--end头部-->

    <!--内容-->
    
<link type="text/css" rel="stylesheet" href="__TAOKE__/css/popup.css">

<script type="text/javascript" src="__TAOKE__/js/popup.js"></script>
    <div class="cxx-main" id="top">
<div class="am-sticky-placeholder" style="height: 81px; margin: 0px;"><div class="cxx-header" data-am-sticky="{animation: &#39;slide-top&#39;}" style="margin: 0px; z-index: 999;">
    <header class="am-padding-vertical-xs cxx-background-pink">
        <div class="am-g">
            <div class="am-u-sm-1 am-text-center" onclick="$('.scroll-wrapper').empty();history.go(-1);">
                <i class="am-icon-angle-left am-text-xl" style="color:#fff;line-height:30px;"></i>
            </div>

            <div class="am-u-sm-10  am-text-center am-text-lg" style="color:#fff;line-height:30px;">{$type_title}</div>
            <div class="am-u-sm-1 am-text-center" style="padding-left: 0rem;">
                <a href="{:url('wechat/Index/index')}">
                    <i class="am-icon-home am-text-xl" style="color:#fff;line-height:30px;"></i>
                </a>
            </div>
        </div>
    </header>

    <!--导航栏-->
    {include file="public/nav" /}
    <!--导航栏-->

<!--主题内容-->

    <!--商品列表-->
    <section class="cxx-goods">
        <ul class="cxx-goods-list"> 

        </ul>
    </section>
<div class="cxx-loading" style="display: none;"><span class="am-text-sm"><i class="am-icon-spinner am-icon-pulse am-margin-right-xs"></i>商品正在赶来的路上，请稍后</span></div>

</div>
<!--end内容-->


    <!--end内容-->

    <!--底部-->
    
    
    <!--end底部-->
    <!--返回顶部-->
<div class="am-gotop-fixed am-active" style="bottom:65px;">
         
    <a href="#top" title="">
        <i class="am-gotop-icon am-icon-angle-up am-round" style="line-height:4rem;font-size: 2.4rem;"></i>
    </a>
</div>
<script src="__TAOKE__/js/amazeui.min.js"></script>
<script src="__TAOKE__/js/clipboard.min.js"></script>

    <script type="text/javascript">
        $(function(){
            $('#drop-down, .drop-down').click(
                function(){
                    var action = $('#drop-down, .drop-down').attr('data-action');
                    if(action == 'down'){
                        $('.drop-down-bg-wrap i').attr({ class: "am-icon-angle-up am-text-xl" });
                        $('.cxx-header').css({'z-index':'1200'});
                        $('.cxx-more-cate').slideDown('fast');
                        $('.cxx-transparent-bg').show();
                        $('#drop-down, .drop-down').attr('data-action','up');
                    }
                    if(action == 'up'){
                        $('.drop-down-bg-wrap i').attr({ class: "am-icon-angle-down am-text-xl" });
                        $('.cxx-transparent-bg').hide();
                        $('.cxx-more-cate').slideUp('fast');
                        $('.cxx-header').css({'z-index':'999'});
                        $('.cxx-transparent-bg').hide();
                        $('#drop-down, .drop-down').attr('data-action','down');
                    }
                }
            );

            $('.cxx-transparent-bg').on('click',function(){
                var action = $('#drop-down, .drop-down').attr('data-action');
                if(action == 'up'){
                    $('.drop-down-bg-wrap i').attr({ class: "am-icon-angle-down am-text-xl" });
                    $('.cxx-transparent-bg').hide();
                    $('.cxx-more-cate').slideUp('fast');
                    $('.cxx-header').css({'z-index':'999'});
                    $('.cxx-transparent-bg').hide();
                    $('#drop-down, .drop-down').attr('data-action','down');
                }
                $('.cxx-transparent-bg').hide();
            });
        });
    </script>

<script>
$(function() {
    var wd = "";
    isLock = true;
    p = 1;
    var price_range = '';
    var goodsBgimg = '__TAOKE__/img/goodsBg.png';
    var detail_url = '{:url('wechat/Items/detail')}?id=';


    $('.cxx-goods-list').off('click').on('click', '.cxx-prize', function(e) {
        
        if($(".cxx-goods-list").length == 0) return;
        var scrollTop = window.pageYOffset  
                || document.documentElement.scrollTop  
                || document.body.scrollTop  
                || 0;
        window.localStorage.setItem("p", $('#p').html());
        window.localStorage.setItem("top", scrollTop);
        window.localStorage.setItem("html", $(".cxx-goods-list").html());
        window.localStorage.setItem("page", $(".cxx-this-page").parent().html());
        window.localStorage.setItem("url", window.location.href);
        window.location.href = $(this).attr('data-url');
    });
    if(window.localStorage.getItem("url") == window.location.href && window.localStorage.getItem("top") != "null") {
        $(".cxx-goods-list").html(window.localStorage.getItem("html"));
        $("img.lazy").lazyload();
        $(".cxx-this-page").parent().html(window.localStorage.getItem("page"));
        document.body.scrollTop = window.localStorage.getItem("top");
        p = parseInt(window.localStorage.getItem("p"));
        window.localStorage.setItem("p", "null");
        window.localStorage.setItem("top", "null");
        window.localStorage.setItem("html", "null");
    }else{
        cxxia.goodList({p:p,wd:wd,price_range:price_range, type:'post',goodsBgimg:goodsBgimg,detail_url:detail_url, url:"{:url('wechat/Items/lists')}?cate={$cate_id}&{$type_result}"});
    }

    $('#J_SiftCommit').click(function () {
        var start_price = $('#start_price').val();
        var end_price = $('#end_price').val();
        if((start_price=='')&&(end_price=='')){
            return false;
        }
        else{
            price_range = start_price + ':' + end_price;
            p = 1;
            console.log(price_range);
            $(".cxx-goods-list").html('');
            cxxia.goodList({p:p, wd:wd,price_range:price_range,type:'post',goodsBgimg:goodsBgimg,detail_url:detail_url, url:"{:url('wechat/Items/lists')}?cate={$cate_id}&{$type_result}"});
            //拉起
            $('.drop-down-bg-wrap i').attr({ class: "am-icon-angle-down am-text-xl" });
            $('.cxx-transparent-bg').hide();
            $('.cxx-more-cate').slideUp('fast');
            $('.cxx-header').css({'z-index':'999'});
            $('.cxx-transparent-bg').hide();
            $('#drop-down, .drop-down').attr('data-action','down');
        }
    });

    $('#J_SiftClear').click(function () {
        price_range = '';
        p = 1;
        $('#start_price').val('');
        $('#end_price').val('');
        $(".cxx-goods-list").html('');
        cxxia.goodList({p:p, wd:wd,price_range:price_range,type:'post',goodsBgimg:goodsBgimg,detail_url:detail_url, url:"{:url('wechat/Items/lists')}?cate={$cate_id}&{$type_result}"});
        //拉起
        $('.drop-down-bg-wrap i').attr({ class: "am-icon-angle-down am-text-xl" });
        $('.cxx-transparent-bg').hide();
        $('.cxx-more-cate').slideUp('fast');
        $('.cxx-header').css({'z-index':'999'});
        $('.cxx-transparent-bg').hide();
        $('#drop-down, .drop-down').attr('data-action','down');
    });

    //取窗口可视范围的高度 
    function getClientHeight(){    
        var clientHeight=0;    
        if(document.body.clientHeight&&document.documentElement.clientHeight){    
            var clientHeight=(document.body.clientHeight<document.documentElement.clientHeight)?document.body.clientHeight:document.documentElement.clientHeight;            
        }else{    
            var clientHeight=(document.body.clientHeight>document.documentElement.clientHeight)?document.body.clientHeight:document.documentElement.clientHeight;        
        }    
        return clientHeight;    
    } 
    //取窗口滚动条高度 
    function getScrollTop(){    
        var scrollTop=0;    
        if(document.documentElement&&document.documentElement.scrollTop){    
            scrollTop=document.documentElement.scrollTop;    
        }else if(document.body){    
            scrollTop=document.body.scrollTop;    
        }    
        return scrollTop;    
    } 
    //取文档内容实际高度 
    function getScrollHeight(){    
        return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);    
    } 
    
    $(window).scroll(function () {
        var h=$(this).scrollTop(); 
        if(h>10){
            $(".cxx-loading").show().html('<span class="am-text-sm"><i class="am-icon-spinner am-icon-pulse am-margin-right-xs"></i>商品正在赶来的路上，请稍后</span>');
        }else{
            $(".cxx-loading").fadeOut('fast'); 
        }

        var height=getClientHeight(); 
        var theight=getScrollTop(); 
        var rheight=getScrollHeight(); 
        var bheight=rheight-theight-height; 
        if (bheight <= 56 && isLock) {
            p = p + 1;
            isLock = false;
            cxxia.goodList({p:p, wd:wd, price_range:price_range,type:'post',goodsBgimg:goodsBgimg,detail_url:detail_url, url:"{:url('wechat/Items/lists')}?cate={$cate_id}&{$type_result}"});
            isLock = true;            
        }
    });
});
</script>
<script>
setTimeout(function() {
    window.addEventListener("popstate", function(e) {
        window.location.hash
    }, false)
}, 300);
$(function() {


});
</script>


</body>
</html>